<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: SXLWTT
  Date: 2021/10/25
  Time: 9:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="/jquery-ui-1.10.4.custom/js/jquery-1.10.2.js"></script>
    <script src="/jquery-ui-1.10.4.custom/js/jquery-ui-1.10.4.custom.min.js"></script>
    <link rel="stylesheet" href="/jquery-ui-1.10.4.custom/css/base/jquery-ui-1.10.4.custom.min.css">

</head>
<body>
<table>
    <tr>
        <td colspan="21">
            <form action="list.do" method="post">
                <input type="hidden" name="pageNum">
                财务日期：<input type="text" name="adateX" value="${map.adateX}">
                <input type="text" name="adateD" value="${map.adateD}">
                原账号模糊：<input type="text" name="yid" value="${map.yid}">
                原账号名称：<input type="text" name="yname" value="${map.yname}">
                目标账号模糊：<input type="text" name="mid" value="${map.mid}">
                目标账号名称：<input type="text" name="mname" value="${map.mname}">
                科目编号模糊：<input type="text" name="kid" value="${map.kid}">
                科目名称末糊<input type="text" name="kname" value="${map.kname}">
                摘要(备注)：<input type="text" name="kotes" value="${map.kotes}">
                借方金额：<input type="text" name="debtorX" value="${map.debtorX}">
                <input type="text" name="debtorD" value="${map.debtorD}">
                贷方金额：<input type="text" name="creditX" value="${map.creditX}">
                <input type="text" name="creditD" value="${map.creditD}">
                余额<input type="text" name="balanceX" value="${map.balanceX}">
                <input type="text" name="balanceD" value="${map.balanceD}">
                <input type="submit" value="查询">
                <a href="list.do">刷新</a>
            </form>
        </td>
    </tr>
    <tr>
        <td>编号</td>
        <td>账户日期</td>
        <td>源账号</td>
        <td>源账号名称</td>
        <td>目标账号</td>
        <td>目标账号名称</td>
        <td>科目编号</td>
        <td>科目</td>
        <td>摘要（备注）</td>
        <td>借方金额</td>
        <td>贷方金额</td>
        <td>余额</td>
    </tr>
    <c:forEach items="${pageInfo.list}" var="li">
        <tr>
            <td>${li.aid}</td>
            <td>${li.adate}</td>
            <td>${li.yid}</td>
            <td>${li.yname}</td>
            <td>${li.mid}</td>
            <td>${li.mname}</td>
            <td>${li.kid}</td>
            <td>${li.kname}</td>
            <td>${li.kotes}</td>
            <td>${li.debtor}</td>
            <td>${li.credit}</td>
            <td>${li.balance}</td>
        </tr>
    </c:forEach>
    <tr>
        <td colspan="18">
            <a href="javaScript:qwe(1)">首页</a>
            <a href="javaScript:qwe(${pageInfo.isFirstPage?1:pageInfo.prePage})">上一页</a>
            <c:forEach items="${pageInfo.navigatepageNums}" var="index">
                <a href="javaScript:qwe(${index})">${index}</a>
            </c:forEach>
            <a href="javaScript:qwe(${pageInfo.isLastPage?pageInfo.pages:pageInfo.nextPage})">下一页</a>
            <a href="javaScript:qwe(${pageInfo.pages})">尾页</a>
            <input type="button" value="添加" onclick="add()">
        </td>
    </tr>
</table>
</body>
</html>
<script>
    function add() {
        location="toadd.do";
    }
    function qwe(pageNum) {
        $("[name='pageNum']").val(pageNum)
        $("form").submit()
    }
</script>
